package com.atguigu.tingshu.order.service;

import com.atguigu.tingshu.model.order.OrderInfo;
import com.atguigu.tingshu.vo.order.OrderInfoVo;
import com.atguigu.tingshu.vo.order.TradeVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

public interface OrderInfoService extends IService<OrderInfo> {


    /**
     * 确认订单信息
     * @param tradeVo
     * @param userId
     * @return
     */
    OrderInfoVo trade(TradeVo tradeVo, Long userId);

    /**
     * 提交订单
     * @param orderInfoVo
     * @param userId
     * @return
     */
    String submitOrder(OrderInfoVo orderInfoVo, Long userId);

    /**
     * 订单取消
     * @param orderNo
     */
    void orderCancel(String orderNo);

    /**
     * 查看订单信息
     * @param pageParam
     * @param userId
     * @return
     */
    IPage<OrderInfo> findUserPage(Page<OrderInfo> pageParam, Long userId);

    /**
     * 根据orderno获取订单信息
     * @param orderNo
     * @return
     */
    OrderInfo getOrderInfo(String orderNo);
}
